Adaptively Determining Response Time Distribution of Transactional Workloads

ABSTRACT

An adaptive mechanism is provided that learns the response time characteristics of a workload by measuring the response times of end user transactions, classifies response times into buckets, and dynamically adjusts the response time distribution as response time characteristics of the workload change. The adaptive mechanism maintains the actual distribution across changes and, thus, helps the end user to understand changes of workload behavior that take place over a longer period of time. The mechanism is stable enough to suppress spikes and returns a constant view of workload behavior, which is required for long term, performance analysis and capacity planning. The mechanism distinguishes between an initial learning phase of establishing the distribution and one or multiple reaction periods. The reaction periods can be for example a fast reaction period for strong fluctuations of the workload behavior and a slow reaction period for small deviations.

BACKGROUND

The present application relates generally to an improved data processingapparatus and method and more specifically to mechanisms for adaptivelydetermining response time distributions of transactional workloads.

Many computer environments today, such as enterprise resource planning(ERP) systems and database processing systems, operate on what arereferred to as transactional workloads. A transaction is a unit of workperformed within a system and treated in a coherent and reliable wayindependent of other transactions. By definition, a transaction must beatomic, consistent, isolated and durable. Practitioners often refer tothese properties of transactions using the acronym ACID. Transactionsprovide an “all-or-nothing” proposition, stating that each work-unitperformed must either complete in its entirety or have no effectwhatsoever.

A computer system may sort transactions into service classes accordingto sets of predefined rules. A service class is a group of work thatshares similar attributes and is managed by the system toward aninstallation defined goal, which may be a response time goal, and towardan installation defined importance level. A response time goal is anobjective that the system and the component workload manager attempts tomeet. The system attempts to meet the goals of the most important workfirst by assigning system resources to that work to meet the goal.

For each service class, the computer system provides management and/orreporting facilities. The computer system may report one transactioninto one or several report classes based on sets of predefined rules. Areport class works for reporting purposes only. A report class is not amechanism for managing work, but is used for the user of the system toobserve how work performs. The system may associate each unit of workwith one service class (mandatory) and one or more report classes(optional).

Because saving individual response times of all transactions associatedwith a service or report class takes a large amount of storage space,the system may provide a consolidated reporting of transaction responsetimes over time periods. This consolidated reporting is referred to as aresponse time distribution (RTD).

A response time distribution (RTD) is a form of histogram. Instatistics, a histogram is a graphical representation showing a visualimpression of the distribution of data. A histogram consists of tabularfrequencies erected over discrete intervals, referred to as “buckets” or“bins.” The height of a rectangle is also equal to the frequency densityof the interval, i.e., the frequency divided by the width of theinterval. The total area of the histogram is equal to the number ofdata. A histogram may also be normalized displaying relativefrequencies. It then shows the proportion of cases that fall into eachof several categories, with the total area equaling 1. The categoriesare usually specified as consecutive, non-overlapping intervals of avariable.

A response time distribution (RTD) depicts the behavior of atransaction-based system by assigning each completed transaction to abucket based on response time. Each bucket represents a range ofresponse times based on a midpoint. A response time distribution isstatic, because the ranges represented by the buckets and the midpointare determined ahead of time. The midpoint may be derived based on aresponse time goal or expected response time, for example.

SUMMARY

In one illustrative embodiment, a method, in a data processing system,is provided for adaptive response time distribution of transactionalworkloads. The method comprises generating a response time distributionbased on an initial midpoint, wherein the response time distributioncomprises a plurality of buckets. Each bucket within the plurality ofbuckets defines a time range relative to the initial midpoint and has acorresponding bucket counter. The method further comprises recordingtransaction response times of transactions in the data processing systemfor at least one time interval and assigning the collected transactionresponse times to the plurality of buckets of the response timedistribution. The method further comprises determining a new midpointbased on the collected transaction response times responsive todetecting variation of response times from the initial midpoint. Themethod further comprises updating the response time distribution basedon the new midpoint such that each bucket of the response timedistribution defines a time range relative to the new midpoint.

In other illustrative embodiments, a computer program product comprisinga computer useable or readable medium having a computer readable programis provided. The computer readable program, when executed on a computingdevice, causes the computing device to perform various ones of, andcombinations of, the operations outlined above with regard to the methodillustrative embodiment.

In yet another illustrative embodiment, a system/apparatus is provided.The system/apparatus may comprise one or more processors and a memorycoupled to the one or more processors. The memory may compriseinstructions which, when executed by the one or more processors, causethe one or more processors to perform various ones of, and combinationsof, the operations outlined above with regard to the method illustrativeembodiment.

These and other features and advantages of the present invention will bedescribed in, or will become apparent to those of ordinary skill in theart in view of, the following detailed description of the exampleembodiments of the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention, as well as a preferred mode of use and further objectivesand advantages thereof, will best be understood by reference to thefollowing detailed description of illustrative embodiments when read inconjunction with the accompanying drawings, wherein:

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented;

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented;

FIG. 3 depicts an example response time distribution generated inaccordance with one embodiment;

FIG. 4 depicts a block diagram of a response time distribution mechanismfor adaptively determining response time distribution of transactionworkloads in accordance with an illustrative embodiment;

FIG. 5 depicts an example adaptive response time distribution generatedin accordance with an illustrative embodiment;

FIG. 6 is a flowchart illustrating operation of a mechanism foradaptively determining response time distributions of transactionalworkloads in accordance with an illustrative embodiment;

FIG. 7 is a flowchart illustrating operation of mechanism for performinginitialization in accordance with an illustrative embodiment;

FIG. 8 is a flowchart illustration operation of a mechanism for buildinga response time distribution in accordance with an illustrativeembodiment;

FIG. 9 is a flowchart illustrating operation of a mechanism for checkingthe distribution and updating the counters in accordance with anillustrative embodiment;

FIG. 10 is a flowchart illustrating operation of a mechanism forchanging the midpoint and propagating results in accordance with anillustrative embodiment;

FIG. 11 is a flowchart illustrating operation of a mechanism forprocessing an ended transaction in accordance with an illustrativeembodiment;

FIG. 12 illustrates a response time distribution with twenty-eightbuckets in accordance with one example embodiment;

FIG. 13 illustrates a response time distribution with fourteen bucketsin accordance with one example embodiment;

FIG. 14 is a table illustrating midpoint change rates in accordance withan example embodiment;

FIGS. 15A and 15B show example response time distributions that arestrongly below the midpoint in accordance with an example embodiment;

FIGS. 16A and 16B show example response time distributions that arestrongly above the midpoint in accordance with an example embodiment;

FIGS. 17A and 17B show example response time distributions that aremoderately below the midpoint in accordance with an example embodiment;and

FIGS. 18A and 18B show example response time distributions that aremoderately above the midpoint in accordance with an example embodiment.

DETAILED DESCRIPTION

The illustrative embodiments provide an adaptive mechanism that learnsthe response time characteristics of a workload by measuring theresponse times of end user transactions, classifies response times intobuckets, and dynamically adjusts the response time distribution asresponse time characteristics of the workload change. The adaptivemechanism maintains the actual distribution across changes and, thus,helps the end user to understand changes of workload behavior that takeplace over a longer period of time. The mechanism is stable enough tosuppress spikes and returns a constant view of workload behavior, whichis required for long term performance analysis and capacity planning.The mechanism distinguishes between an initial learning phase ofestablishing the distribution and one or multiple reaction periods. Thereaction periods can be for example a fast reaction period for strongfluctuations of the workload behavior, and a slow reaction period forsmall deviations. Alternatively, the mechanism may implement fewer ormore reaction periods (e.g., fast, modest, slow, etc.) if desired.

The illustrative embodiments may be utilized in many different types ofdata processing environments. In order to provide a context for thedescription of the specific elements and functionality of theillustrative embodiments, FIGS. 1 and 2 are provided hereafter asexample environments in which aspects of the illustrative embodimentsmay be implemented. It should be appreciated that FIGS. 1 and 2 are onlyexamples and are not intended to assert or imply any limitation withregard to the environments in which aspects or embodiments of thepresent invention may be implemented. Many modifications to the depictedenvironments may be made without departing from the spirit and scope ofthe present invention.

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented. Distributed data processing system 100 may include anetwork of computers in which aspects of the illustrative embodimentsmay be implemented. The distributed data processing system 100 containsat least one network 102, which is the medium used to providecommunication links between various devices arid computers connectedtogether within distributed data processing system 100. The network 102may include connections, such as wire, wireless communication links, orfiber optic cables.

In the depicted example, server 104 and server 106 are connected tonetwork 102 along with storage unit 108. In addition, clients 110, 112,and 114 are also connected to network 102. These clients 110, 112, and114 may be, for example, personal computers, network computers, or thelike. In the depicted example, server 104 provides data, such as bootfiles, operating system images, and applications to the clients 110,112, and 114. Clients 110, 112, and 114 are clients to server 104 in thedepicted example. Distributed data processing system 100 may includeadditional servers, clients, and other devices not shown.

In the depicted example, distributed data processing system 100 is theInternet with network 102 representing a worldwide collection ofnetworks and gateways that use the Transmission ControlProtocol/Internet Protocol (TCP/IP) suite of protocols to communicatewith one another. At the heart of the Internet is a backbone ofhigh-speed data communication lines between major nodes or hostcomputers, consisting of thousands of commercial, governmental,educational and other computer systems that route data and messages. Ofcourse, the distributed data processing system 100 may also beimplemented to include a number of different types of networks, such asfor example, an intranet, a local area network (LAN), a wide areanetwork (WAN), or the like. As stated above, FIG. 1 is intended as anexample, not as an architectural limitation for different embodiments ofthe present invention, and therefore, the particular elements shown inFIG. 1 should not be considered limiting with regard to the environmentsin which the illustrative embodiments of the present invention may beimplemented.

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented. Dataprocessing system 200 is an example of a computer, such as server 104 orclient 110 in FIG. 1, in which computer usable code or instructionsimplementing the processes for illustrative embodiments of the presentinvention may be located.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbasic input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within the dataprocessing system 200 in FIG. 2. As a client, the operating system maybe a commercially available operating system such as Microsoft® Windows7®. An object-oriented programming system, such as the Java™ programmingsystem, may run in conjunction with the operating system and providescalls to the operating system from Java™ programs or applicationsexecuting on data processing system 200.

As a server, data processing system 200 may be, for example, an IBM®eServer™ System p® computer system, running the Advanced InteractiveExecutive (AIX®) operating system or the LINUX® operating system. Dataprocessing system 200 may be a symmetric multiprocessor (SMP) systemincluding a plurality of processors in processing unit 206.Alternatively, a single processor system may be employed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for illustrative embodiments of thepresent invention may be performed by processing unit 206 using computerusable program code, which may be located in a memory such as, forexample, main memory 208, ROM 224, or in one or more peripheral devices226 and 230, for example.

A bus system, such as bus 238 or bus 240 as shown in FIG. 2, may becomprised of one or more buses. Of course, the bus system may beimplemented using any type of communication fabric or architecture thatprovides for a transfer of data between different components or devicesattached to the fabric or architecture. A communication unit, such asmodem 222 or network adapter 212 of FIG. 2, may include one or moredevices used to transmit and receive data. A memory may be, for example,main memory 208, ROM 224, or a cache such as found in NB/MCH 202 in FIG.2.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1 and 2 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1 and 2. Also,the processes of the illustrative embodiments may be applied to amultiprocessor data processing system, other than the SMP systemmentioned previously, without departing from the spirit and scope of thepresent invention.

Moreover, the data processing system 200 may take the form of any of anumber of different data processing systems including client computingdevices, server computing devices, a tablet computer, laptop computer,telephone or other communication device, a personal digital assistant(PDA), or the like. In some illustrative examples, data processingsystem 200 may be a portable computing device that is configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data, for example. Essentially, dataprocessing system 200 may be any known or later developed dataprocessing system without architectural limitation.

With prior art response time measurement mechanisms, it is only possibleto measure the average response time of the number of ended transactionsfor a defined interval plus some standard statistical metrics, such asskew, deviation, and median. The response time distribution can only bedepicted if an initial midpoint for the distribution is known or can bedetermined, e.g., a response time goal or expected response time. Withprior art solutions, it is not possible to provide a response timedistribution that can be used as a constant source for end userevaluation even if the transactional workload is not managed towardsresponse time characteristics of the workload.

The illustrative embodiments provide a response time distribution thatis accurate enough to depict the behavior of the transactions and isstable enough to react only to considerable deviations of thetransaction behavior. The mechanisms of the illustrative embodimentsprovide valuable assistance for customer installation in assessing,planning, and managing execution characteristics of the workload.

FIG. 3 depicts an example response time distribution generated inaccordance with one embodiment. In the depicted example, the systemdefines the midpoint of the RTD to 1 second. The buckets are definedwith respect to the midpoint. For example, the first bucket includes therange [0 s, 0.5 s], which includes transactions that are less than 50%of the midpoint. The second bucket includes the range [0.5 s, 0.6 s],which includes transactions from 50% to 60% of the midpoint. The thirdthrough eleventh buckets define 10% increments with respect to themidpoint up to 150% of the midpoint. The twelfth bucket includes therange [1.5 s, 2.0 s], which includes transactions from 150% to 200% ofthe midpoint. The thirteenth bucket includes the range [2.0 s, 4.0 s],which includes transactions from 200% to 400%. of the midpoint. Finally,the fourteenth bucket includes the range [4.0 s, ∞], which includestransactions that are greater than four times the midpoint.

The RTD shown in FIG. 3 represents a typical distribution, although themidpoint will vary depending on expected response times, andmodifications may be made to the distribution of buckets depending uponimplementation. An RTD contains other statistical data, such as the sumof all response times, which may be divided by the total number oftransactions to give the average response time, for example.

An RTD may be used for static analysis after all transactions have endedor dynamically if the system displays the RTD while the workload isrunning. In both cases, the midpoint must be specified before buildingthe RTD, for example through user or system definitions. In the priorart, a user defines the midpoint, and thus the distribution, ahead oftime based on an expected response time or a particular goal. If themidpoint is too low or too high, most transactions accumulate in thefirst or last bucket, and the RTD is not informative.

FIG. 4 depicts a block diagram of a response time distribution mechanismfor adaptively determining response time distribution of transactionworkloads in accordance with an illustrative embodiment. The responsetime distribution (RTD) mechanism 410 of the illustrative embodimentdeals with service classes for which a static midpoint definition maynot be possible or desirable. The RTD mechanism 410 adapts to thetransactions without being unstable.

RTD mechanism 410 may be embodied as special-purpose hardware, softwarerunning on a general purpose computer, or a combination of software andspecial-purpose hardware. In one example embodiment, RTD mechanism 410may be embodied as software executing on a computer, such as server 104or client 110 in FIG. 1. Mechanism 410 monitors transaction responsetimes and records these transaction response times in an accumulatedtransaction history 402. Mechanism 410 receives initial values 414 andgenerates RTD definition 412. For a given time period, RTD mechanism 410generates RTD display 416.

In accordance with the illustrative embodiment, RTD mechanism 410dynamically adjusts RTD definition 412 based on the transaction responsetimes in accumulated transaction history 402. RTD mechanism 410 checksits adaptive RTD definition 412 periodically at fixed intervals toensure the current transactions fit well into the RTD definition 412. IfRTD mechanism 410 determines most transactions are too far from themidpoint for a predetermined number of intervals, RTD mechanism 410adjusts the midpoint and thus the bucket distribution of RTD definition412. RTD mechanism 410 may then discard the old RTD definition andplaces transaction response times into the new RTD definition 412.

Internally, RTD mechanism 410 defines what is considered “too far fromthe midpoint” and the predetermined number of intervals according toinitial values 414. That is, initial values 414 may include a lowthreshold, a high threshold, and a counter that counts the number ofresponse times less than the low threshold or greater than the highthreshold. The low threshold and high threshold may be set topercentages of the midpoint or to predetermined sets of buckets. Forexample, the low threshold may be set to the first bucket, and the highthreshold may be set to the last bucket. Alternatively, the lowthreshold may be set to the first three buckets, and the high thresholdmay be set to the last three buckets.

In accordance with one embodiment, RTD mechanism 410 sets the midpointto an initial value of zero. In this embodiment, the RTD definition 412has a predetermined number, n, of buckets, where the first n−1 bucketsinclude a range of [0 s, 0 s], and the nth bucket includes a range of [0s, ∞]. RTD mechanism 410 collects transaction response times for apredetermined initial lead time, assigns transactions to bucketsaccording to RTD definition 412, and accumulates the transactionresponse times in accumulated transaction history 402.

In one example embodiment, assigning a transaction to a bucket maycomprise incrementing a counter associated with the bucket. In anotherexample embodiment, RTD mechanism 410 may store a bucket identifier andaccumulate the transaction in the accumulated transaction history 402.In this embodiment, RTD mechanism 410 may generate RTD display 416 bycounting the number of transactions in accumulated transaction history402 having a corresponding bucket identifier for each bucket andbuilding a RTD histogram for RTD display 416.

After this initial lead time, RTD mechanism 410 determines alltransactions are assigned to the last bucket. Thus, RTD mechanism 410determines that all transaction response times are greater than the highthreshold. RTD mechanism 410 then determines a new midpoint based on thetransaction response times collected during the initial lead time. Inone example embodiment, RTD mechanism 410 may set the midpoint to beequal to the average of response time values collected during theinitial lead time, although other techniques may be used to set themidpoint for the RTD definition. RTD mechanism 410 then sets RTDdefinition 412 based on this new midpoint. In other words, RTD mechanism410 determines the bucket ranges with respect to the midpoint. RTDmechanism 410 then assigns transactions to the buckets in new RTDdefinition 412.

After the initial lead time, the RTD mechanism 410 collects transactionresponse times and accumulates these transactions in the accumulatedtransaction history 402. RTD mechanism 410 assigns transactions tobuckets according to RTD definition 412. At the end of fixed timeintervals, RTD mechanism 410 determines whether a predetermined numberof transactions are less than the low threshold or greater than the highthreshold. With an accurate determination of the midpoint, mosttransactions are assigned to buckets near the midpoint; however, astransaction workloads change, response times may decrease or increase.For example, during light transaction workloads, response times maydecrease, and during heavy transaction workloads, response times mayincrease.

If RTD mechanism 410 determines a predetermined number or percentage oftransactions are less than the low threshold or greater than the highthreshold for a predefined period of time, RTD mechanism 410 determinesa new midpoint based on the based on the transaction response timescollected during the initial lead time. RTD mechanism 410 then sets RTDdefinition 412 based on this new midpoint. In other words, RTD mechanism410 determines the bucket ranges with respect to the midpoint, RTDmechanism 410 then assigns transactions to the buckets in new RTDdefinition 412.

In accordance with one embodiment, RTD mechanism 410 generates RTDdisplay 416 based on a sliding window of transactions where oldertransactions in transaction history 402 “age out” of the window. Thus,RTD mechanism 410 deletes transaction times recorded in transactionhistory 402 prior to the predetermined window. The size of the windowmay be defined in initial values 414, for example. This allows RTDmechanism 410 to generate a real-time RTD display 416 based on the mostrelevant data.

In accordance with one embodiment, accumulated transaction history 402records a plurality of rows of bucket count values. For example, RTDmechanism 410 may accumulate transaction times in a first row ofaccumulated transaction history 402 for a 10-second period of time. Itis possible RTD mechanism 410 may not have accumulated enough endedtransactions during the last 10 seconds to obtain a statisticallymeaningful distribution. Thus, RTD mechanism 410 records data from theprevious 10 second intervals; however, RTD mechanism 410 does not keepeach interval individually. In fact, RTD mechanism 410 records, forexample, one row of distribution for the last 10 seconds, another forthe last 20 seconds, one for the last 40 seconds, one for the last 160seconds, and one for the last 640 seconds. Every 20, 40, 160, and 640seconds, RTD mechanism 410 rolls data to the next row. That means, forexample, if a timer value is at 16, RTD mechanism 410 rolls the fourthrow, which represents 160 seconds, to the fifth row by adding the bucketcounts from the fourth row to those in the fifth row and copying thebucket counts from the third row to the fourth row, copying the countsfrom the second row to the third row, copying the bucket counts from thefirst row to the second row, and clearing the first row. RTD mechanism410 may also store a sixth row that is not rolled but simply stores acopy of the bucket counts from the fifth row every 640 seconds. A personof ordinary skill in the art will recognize that the time values forintervals and for the rows in accumulated transaction history 402 aregiven by way of example, and these values and the number of rows mayvary depending upon the implementation.

FIG. 5 depicts an example adaptive response time distribution generatedin accordance with an illustrative embodiment. FIG. 5 shows the bucketsnot as a bar chart, but as a stacked chart, where the distribution ateach given point in time adds up to 100%. The cross-section at eachpoint in time represents an RTD. FIG 5 shows the evolution of the RTDover time.

As seen in FIG. 5, there are no transactions before time 08:34. Theadaptive RTD has a midpoint set to an initial value of 0 seconds, so ailtransactions accumulate into the last bucket until 08:45. Between 08:45and 08:46, the RTD mechanism calculates a new midpoint. The RTDmechanism sets the new midpoint to 0.070 seconds. The RTD mechanism thenassigns the previously collected and newly collected transactionresponse times to buckets. As shown in FIG. 5, except for time 08:46,most transactions accumulate into buckets around the midpoint.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in any one or more computer readablemedium(s) having computer usable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CDROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, in abaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Computer code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radio frequency (RF), etc., or anysuitable combination thereof.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java™, Smalltalk™, C++, or the like, and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to the illustrativeembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions thatimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 6 is a flowchart illustrating operation of a mechanism foradaptively determining response time distributions of transactionalworkloads in accordance with an illustrative embodiment. In block 600,operation starts, and the mechanism performs initialization (block 700),The process of performing initialization is described in further detailbelow with reference to FIG. 7. The mechanism begins a loop that repeatsfor every time interval, TI (block 601). The mechanism then begins aloop that repeats for each service class (block 602). A service class isa group of work that shares similar attributes and is managed by thesystem towards a goal.

The mechanism builds a response time distribution (RTD) (block 800). Theprocess of building a response time distribution is described in furtherdetail below with reference to FIG. 8. Then, the mechanism checks thedistribution and update counter, the out of interval counter (OIC)(block 900). The process of checking the distribution and updating thecounters is described in further detail below with reference to FIG. 9.

The mechanism determines whether the absolute value of OIC is greaterthan or equal to a predetermined threshold (block 603). As will bedescribed in further detail below, the mechanism increments ordecrements OIC based on trends in response times. For a first trend, themechanism decrements OIC such that OIC becomes negative. For a secondtrend, the mechanism increments OIC such that OIC becomes positive. Fora third trend, if the response times are close to the midpoint, themechanism decrements the absolute value of OIC such that OIC becomescloser to zero from either direction. A determination that the absolutevalue of OIC is greater than or equal to the predetermined thresholdindicates the RTD deviates significantly from the midpoint for a periodof time which requires a RTD midpoint change.

If the mechanism determines the absolute value of OIC is less than thethreshold in block 603, the mechanism stores the interval's RTD into anRTD history and performs bookkeeping (block 604). If the mechanismdetermines the absolute value of OIC is greater than or equal to thethreshold in block 603, the mechanism changes the midpoint andpropagates results to the new distribution (block 1000). The process ofchanging the midpoint and propagating results is described in furtherdetail below with reference to FIG. 10. Then, the mechanism stores theinterval's RTD into an RTD history and performs bookkeeping (block 604).

Thus, the mechanism may store an RTD at the end of each time interval toprovide an RTD history. The mechanism may also “age out” transactions bydeleting transaction times recorded or accumulated before apredetermined time. In one example embodiment, the mechanism mayconsider transactions for a predetermined number of time intervals foreach RTD.

Thereafter, the mechanism determines whether the service class is thelast sendee class (block 605). If the service class is not the lastservice class, operation returns to block 602 to repeat the loop for thenext service class. If the service class is the last service class inblock 605, the mechanism waits until the next time interval (block 606),and operation returns to block 601 to repeat the loop for the next timeinterval.

FIG. 7 is a flowchart illustrating operation of mechanism for performinginitialization in accordance with an illustrative embodiment. In block700, operation begins, and the mechanism begins a loop for each serviceclass (block 701). The mechanism initializes the service classRTD-related variables (block 702). In block 702, the mechanisminitializes the interval RTD buckets to 0, initializes all history RTDbuckets to 0, initializes the OIC counter to 0, and initializes othervalues related to RTD. Values related to an RTD may include a timestamp, which tells when the midpoint was last changed, statistics (e.g.,sum of response times, sum of the squares of response times, etc.), acount of the number of times the midpoint was changed, etc. Then, themechanism determines whether the service class has a variable midpoint(block 703). If the service class does not have a variable midpoint, themechanism sets the service class midpoint, MP, from other definitions(block 704). If the service class has a variable midpoint in block 703,the mechanism sets the service class midpoint, MP, to the defaultinitial value (block 705).

Thereafter, the mechanism determines whether the service class is thelast service class (block 706). If the service class is not the lastservice class, operation returns to block 701 to repeat the loop for thenext service class, If the service class is the last service class inblock 706, then operation ends in block 707.

FIG. 8 is a flowchart illustration operation of a mechanism for buildinga response time distribution in accordance with an illustrativeembodiment. In block 800, operation begins, and the mechanism determinesa number of past time intervals to get enough decision data from theresponse time distribution history (block 801). The mechanism sums uphistory distributions to get accumulated RTD (block 802). The mechanismcomputes a number of ended transactions in accumulated RTD (NETA) (block803). NETA is the number of ended transactions accumulated. Themechanism then computes an average response time in accumulated RTD(block 804) and computes other statistical data (block 805). In block804, the mechanism may compute the average response time by dividing thesum of response times by the value of NETA. In block 805, the otherstatistical data may include the sum of the square root of the responsetimes, variance, standard deviation, etc. Thereafter, operation ends inblock 806.

FIG. 9 is a flowchart illustrating operation of a mechanism for checkingthe distribution and updating the counter in accordance with anillustrative embodiment. In block 900, operation begins, and themechanism determines whether the service class has a variable midpoint(block 901). If the sendee class does not have a variable midpoint,operation ends in block 909. If the service class has a variablemidpoint in block 901, the mechanism computes and increment factor,inc_factor, from the number of transactions (NETA) (block 902).

The mechanism begins a loop for each implemented RTD check type (block903). The mechanism determines whether the RTD fails a check (block904). This implementation has an initial learning phase of establishingthe distribution, a fast reaction period for strong fluctuations of theworkload behavior, and a slow reaction period for small deviations.These are included in the RTD check types in blocks 903 and 904,providing great flexibility.

The mechanism determines it is in the initial learning phase responsiveto the midpoint being zero. Strong fluctuation checks follow. An exampleof a strong fluctuation check is determining whether the number oftransactions in the first bucket is greater than or equal to 90% of thetotal number of transactions. Then, the mechanism may perform checks forsmaller deviations. An example of a small deviation check is determiningwhether the first three buckets contain 80% of the total number oftransactions. One may add or remove checks depending upon the desiredbehavior. The order of the checks is important. If a first check iscompletely contained in a second check, then the first check should bedone before the second check. In the above examples, the mechanism mustperform the strong fluctuation check before performing the smallfluctuation check.

The first failed check determines the actions and which trend the RTDfollows (above or below the midpoint). If the RTD fails a check in block904, the mechanism adapts the increment factor to the first failed check(block 905). Depending on the trend, the mechanism sets the incrementfactor, inc_factor, positive or negative. For one trend, OIC willapproach and potentially become greater than a positive threshold, whilefor another trend, OIC will approach and potentially become less than anegative threshold. Moreover, the mechanism may increase or decrease theincrement factor depending on the check type. For example, strongfluctuations may require a quicker midpoint change; therefore, themechanism may increase the absolute value of the increment factor, whilefor small deviations, the mechanism may decrease the absolute value ofthe increment factor, The mechanism then adds the increment factor tothe counter, OIC (block 906). Thereafter, operation ends in block 909.

Returning to block 904, if the RTD does not fail a check, the mechanismdetermines whether the RTD passes all checks (block 907). If themechanism does not fail a check in block 904 and has not passed allchecks in block 907, operation returns to block 903 to repeat the loopfor the next check type. If the mechanism determines the RTD passes allchecks in block 907, the mechanism decrements the absolute value of OICby the increment factor such that OIC becomes closer to zero (block908). Thereafter, operation ends in block 909.

FIG. 10 is a flowchart illustrating operation of a mechanism forchanging the midpoint and propagating results in accordance with anillustrative embodiment. Operation begins in block 1000, and themechanism resets the counter, OIC, to 0 (block 1001). The mechanism setsa new value into the midpoint, MP, from current RTD statistics (block1002), The mechanism then changes the RTD-related variables (block1003). For instance, the mechanism resets the interval buckets to 0,resets all history RTD buckets to 0, and sets other values related toRTD, such as time stamp, etc. In other words, the mechanism clears thebuckets in the RTD from the previous intervals.

Then, the mechanism updates other elements making use of the oldmidpoint and RTD according to the new distribution (block 1004). If themechanism changes the midpoint, the system must also change elementsthat depend on the midpoint. Thereafter, operation ends in block 1005.

FIG. 11 is a flowchart illustrating operation of a mechanism forprocessing an ended transaction in accordance with an illustrativeembodiment. Operation begins when a transaction ends in block 1100, andthe mechanism begins a loop for the service and all report classes towhich the transaction belongs (block 1101). The mechanism compares thetransaction response time to the service or report class midpoint, MP(block 1102). The mechanism computes the appropriate RTD bucket numberbased on the comparison (block 1103). Then, the mechanism increments thevalue in this bucket by 1 (block 1104) and adds the transaction responsetime to the RTD time sum (block 1105). The mechanism may update otherstatistical data, such as the sum of squares of response times and thelike, in block 1105. The mechanism determines whether the service orreport class is the last service or report class to which thetransaction belongs (block 1106). If the service or report class is notthe last service or report class, then operation returns to block 1101to repeat the loop for the next service or report class. If the serviceor report class is the last service or report class to which thetransaction belongs, then operation ends in block 1107.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

In one implementation example, a response time distribution mechanismmay be implemented for the Workload Manager (WLM) component of the z/OS®operating system. “z/OS” is a trademark of International BusinessMachines Corporation in the United States or other countries. In WLM,each transaction can be reported in up to three response timedistributions. FIG. 12 illustrates a response time distribution withtwenty-eight buckets in accordance with one example embodiment. FIG. 13illustrates a response time distribution with fourteen buckets inaccordance with one example embodiment. FIGS. 12 and 13 show theoreticalGaussian distributions of response times with a mean of 1 second and astandard deviation of 1/3 seconds, converted to two RTD types anddisplayed as bar charts. For the RTD shown in FIG. 12, bucket #1contains transactions in the range [0%, 50%] with respect to themidpoint, bucket #2 in the range [50%, 57.5%], . . . , bucket #28 in therange [500%, ∞]. For the RTD shown in FIG. 13, bucket #1 containstransactions in the range [0%, 50%] with respect to the midpoint, bucket#2 in the range [50%, 60%], . . . , and bucket #14 in the range [400%,∞].

In the above example, time intervals for RTD checks may be set to 10seconds. The threshold parameter may be set to 2048. For the initialmidpoint, the inc_factor maximal value is 32 for 160 transactions in theaccumulated RTD, making a first midpoint set possible after 64 timeintervals, which is about 10 minutes, 40 seconds. For the strong RTDfluctuations, inc_factor maximum value is ±16 for 160 transactions inthe accumulated RTD, making a midpoint change possible after 128 timeintervals, which is about 21 minutes, 20 seconds. For moderate RTDfluctuations, inc_factor maximal value is ±5 for 160 transactions in theaccumulated RTD, making a midpoint change possible after 410 timeintervals, which is about 68 minutes, 40 seconds. FIG. 14 is a tableillustrating midpoint change rates in accordance with an exampleembodiment.

FIGS. 15A and 15B show example response time distributions that arestrongly below the midpoint in accordance with an example embodiment. Inthis example, the RTD mechanism performs a check to determine whetherthe first bucket [0%, 50%] contains more than 90% of the transactionsand whether the average response time is less than 1/3 of the midpoint.

FIGS. 16A and 16B show example response time distributions that arestrongly above the midpoint in accordance with an example embodiment. Inthis example, the mechanism performs a check to determine whetherbuckets from 300% to infinity contain more than 80% of the transactions.

FIGS. 17A and 17B show example response time distributions that aremoderately below the midpoint in accordance with an example embodiment.In this example, the RTD mechanism performs a check to determine whetherbuckets in the range from 0% to 72.5% contain more than 80% of thetransactions and whether the average response time is less than 3/4 ofthe midpoint.

FIGS. 18A and 18B show example response time distributions that aremoderately above the midpoint in accordance with an example embodiment.In this example, the RTD mechanism performs a check to determine whetherbuckets from 200% to infinity contain more than 80% of the transactions.

Thus, the illustrative embodiments provide an adaptive mechanism thatlearns the response time characteristics of a workload by measuring theresponse times of end user transactions, classifies response times intobuckets, and dynamically adjusts the response time distribution asresponse time characteristics of the workload change. The adaptivemechanism maintains the actual distribution across changes and, thus,helps the end user to understand changes of workload behavior that takeplace over a longer period of time. The mechanism is stable enough tosuppress spikes and returns a constant view of workload behavior, whichis required for long term performance analysis and capacity planning.The mechanism distinguishes between an initial learning phase ofestablishing the distribution, a fast reaction period for strongfluctuations of the workload behavior, and a slow reaction period forsmall deviations.

As noted above, it should be appreciated that the illustrativeembodiments may take the form of an entirely hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In one example embodiment, the mechanisms of theillustrative embodiments are implemented in software or program code,which includes but is not limited to firmware, resident software,microcode, etc.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers. Network adapters mayalso be coupled to the system to enable the data processing system tobecome coupled to other data processing systems or remote printers orstorage devices through intervening private or public networks. Modems,cable modems and Ethernet cards are just a few of the currentlyavailable types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A method, in a data processing system, for adaptive response timedistribution of transactional workloads, the method comprising:generating a response time distribution based on an initial midpoint,wherein the response time distribution comprises a plurality of buckets,wherein each bucket within the plurality of buckets defines a time rangerelative to the initial midpoint and has a corresponding bucket counter;recording transaction response times of transactions in the dataprocessing system for at least one time interval; assigning thecollected transaction response times to the plurality of buckets of theresponse time distribution; responsive to detecting variation ofresponse times from the initial midpoint, determining a new midpointbased on the collected transaction response times; and updating theresponse time distribution based on the new midpoint such that eachbucket of the response time distribution defines a time range relativeto the new midpoint.
 2. The method of claim 1, wherein detectingvariation of response times comprises: for a given time interval,performing at least one check, wherein each check within the at leastone check determines whether a predetermined percentage of transactionresponse times are assigned to a predetermined set of buckets in theplurality of buckets; responsive to determining the response timedistribution fails a given check within the at least one check,incrementing an out-of-interval counter; and determining whether theout-of-interval counter exceeds a predetermined threshold.
 3. The methodof claim 2, wherein a incrementing the out-of-interval countercomprises: determining an increment factor based on a number oftransaction times collected in the given time interval and anidentification of the given check; and incrementing the out-of-intervalcounter by the increment factor.
 4. The method of claim 2, whereindetecting variation of response times further comprises: responsive todetermining the response time distribution passes the at least onecheck, decrementing an absolute value of the out-of-interval counter. 5.The method of claim 4, wherein decrementing the absolute value of theout-of-interval counter comprises decrementing the absolute value of theout-of-interval counter by an increment factor determined based on anumber of transaction times collected in the given time interval.
 6. Themethod of claim 2, wherein detecting variation of response times furthercomprises: responsive to determining the out-of-interval counter doesnot exceed a predetermined threshold, accumulating the response timedistribution into a response time distribution history.
 7. The method ofclaim 1, wherein determining the new midpoint comprises setting the newmidpoint equal to an average of the collected transaction responsetimes.
 8. The method of claim 1, wherein the at least one intervalcomprise an initial learning phase and wherein generating the responsetime distribution based on the initial midpoint comprises: setting acounter for each bucket within the plurality of buckets to zero; andsetting the initial midpoint to zero.
 9. The method of claim 1, whereinassigning the collected transaction response times to the plurality ofbuckets of the response time distribution comprises: for eachtransaction response time in the collected transaction response times,incrementing a counter associated with a bucket within the plurality ofbuckets defining a time range that includes the transaction responsetime.
 10. The method of claim 1, wherein assigning the collectedtransaction response times to the plurality of buckets of the responsetime distribution further comprises: accumulating transaction responsetimes for a predetermined number of time intervals in an accumulatedtransaction history. 11-24. (canceled)